<?php namespace Common\Model;
use Hdphp\Model\Model;

class Order extends Model
{
	protected $table='orderl';
	protected $validate=array(
	   	array('ourl','required','收货地址不能为空',3,3),
		array('oname','required','收货人不能为空',3,3),
		);
	protected $auto=array(
        array('otime','time','function',3,1),
    );
    public function store(){
    	if (!$this->create()) return false;
    	$this->data['homeuser_id']=$_SESSION['id'];
    	$oid=$this->add();
    	return $oid;
    }
}
?>